Cosmetic changes
authorMatthias Clasen <mclasen@redhat.com>
Mon, 11 Sep 2017 15:22:10 +0000 (11:22 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 11 Sep 2017 15:22:10 +0000 (11:22 -0400)
Use Pango macros for handling PANGO_SCALE.

gsk/gskvulkancolortextpipeline.c
gsk/gskvulkantextpipeline.c

index 0cfe5e560f3cccb20c4983d28af62f0f9b80b5c1..b3da054ffa538e60d70f4142a095bf5ab89e93a6 100644 (file)
@@ -129,7 +129,7 @@ gsk_vulkan_color_text_pipeline_collect_vertex_data (GskVulkanColorTextPipeline *
                                                     &ascent, &height);
               instance->rect[0] = x + cx;
               instance->rect[1] = y + cy - ascent;
-              instance->rect[2] = (float)gi->geometry.width / PANGO_SCALE;
+              instance->rect[2] = PANGO_PIXELS_CEIL (gi->geometry.width);
               instance->rect[3] = height;
 
               count++;
index 5606dfa80718135dc12b6ed993adb11f85058460..81eee308c9c4ac18db07485def3c3fae0ceed113 100644 (file)
@@ -137,7 +137,7 @@ gsk_vulkan_text_pipeline_collect_vertex_data (GskVulkanTextPipeline  *pipeline,
                                                     &ascent, &height);
               instance->rect[0] = x + cx;
               instance->rect[1] = y + cy - ascent;
-              instance->rect[2] = (float)gi->geometry.width / PANGO_SCALE;
+              instance->rect[2] = PANGO_PIXELS_CEIL (gi->geometry.width);
               instance->rect[3] = height;
               instance->color[0] = color->red;
               instance->color[1] = color->green;